package com.ken.checkviolationapp.adapter

import android.content.Context
import androidx.databinding.DataBindingUtil
import com.cimcitech.tebaoscreen.base.BaseHolder
import com.cimcitech.tebaoscreen.base.BaseRecyclerViewAdapter
import com.ken.base_http_library.Detail
import com.ken.base_http_library.oil_price.OilPriceResponse
import com.ken.checkviolationapp.R
import com.ken.checkviolationapp.databinding.ItemOilPriceBinding

/**
 * @author by ken
 * Blog:
 * Date:2020/5/9
 * Description:
 */
class OilPriceAdapter(ctx: Context, layoutRes: Int, mData: MutableList<OilPriceResponse>) :
    BaseRecyclerViewAdapter<OilPriceResponse>(ctx, R.layout.item_oil_price, mData) {
    lateinit var itemOilPriceBinding: ItemOilPriceBinding
    override fun convert(holder: BaseHolder, item: OilPriceResponse, position: Int) {
        itemOilPriceBinding = DataBindingUtil.bind(holder.itemView)!!
        itemOilPriceBinding.oil = item
    }
}